<?php

class Home_Controller extends Base_Controller {
	public $restful=true;

	public function get_index($categorie=null){
		
		if ( is_null($categorie) ){
			return View::make("home.index")->with(array(
																											"seoinfo"    => "index",
																											"links"      => Link::All(),
																											"categories" => categorie::All(),
																											"archives"   => Archive::paginate(3)
																										));
		}else{
			return View::make("home.index")->with(array(
																											"seoinfo"    => "index",
																											"links"      => Link::All(),
																											"categories" => categorie::All(),
																											"archives"   => categorie::find($categorie)->Archive()->paginate(3)
																										));
		}
	}
}